In this practical, as the aim of exploratory data analysis through graphs, I’ve found a dataset of number of suicidals for 101 countries in 30 years between 1985 and 2016. In this dataset, the number of suicidals is divided based on countries, year, age, gender and additionally population, GDP per capita and GDP per year of the country. Some of the countries have missing values for different years, therefore I’ve tried to filter them by ranking through rather than the total numbers of suicides but the number of the suicides per population over years, which would give more sense for observing in a holistic way. For this purpose as well as analysis, there is also another variable represented as “suicides/100k pop” created by number of suicidals based on year, gender and age per 100.000 population of the country. This variable was also useful for examining the suicidal rate in more holistic way.

In the assignment, there will be five graphs shown for examining and exploring the suicidal data of countries that have with top suicidal rates; graphs created based on year, gender, age and comparing suicidal rates with GDP per capita of the countries. Additionally, I’ve created two to four more variables to filter and understand which countries have the most suicidal rates based on countries and years in total.

Exploratory summary of the suicidal dataset:

Statistical Summary

##    country               year          sex                age           
##  Length:27820       Min.   :1985   Length:27820       Length:27820      
##  Class :character   1st Qu.:1995   Class :character   Class :character  
##  Mode  :character   Median :2002   Mode  :character   Mode  :character  
##                     Mean   :2001                                        
##                     3rd Qu.:2008                                        
##                     Max.   :2016                                        
##                                                                         
##   suicides_no        population       suicide_per100k  country_year      
##  Min.   :    0.0   Min.   :     278   Min.   :  0.00   Length:27820      
##  1st Qu.:    3.0   1st Qu.:   97498   1st Qu.:  0.92   Class :character  
##  Median :   25.0   Median :  430150   Median :  5.99   Mode  :character  
##  Mean   :  242.6   Mean   : 1844794   Mean   : 12.82                     
##  3rd Qu.:  131.0   3rd Qu.: 1486143   3rd Qu.: 16.62                     
##  Max.   :22338.0   Max.   :43805214   Max.   :224.97                     
##                                                                          
##   HDI for year   gdp_for_year ($)    gdp_per_capita    generation       
##  Min.   :0.483   Min.   :4.692e+07   Min.   :   251   Length:27820      
##  1st Qu.:0.713   1st Qu.:8.985e+09   1st Qu.:  3447   Class :character  
##  Median :0.779   Median :4.811e+10   Median :  9372   Mode  :character  
##  Mean   :0.777   Mean   :4.456e+11   Mean   : 16866                     
##  3rd Qu.:0.855   3rd Qu.:2.602e+11   3rd Qu.: 24874                     
##  Max.   :0.944   Max.   :1.812e+13   Max.   :126352                     
##  NA's   :19456

By Country

Number of suicides per 100k population by countries

The graphs shown below, it’s created by the aim of observing and comparing suicidal rates of top 10 countries which have the highest number of suicidals per 100k of the population in 30 years. For selecting and filtering the countries, I’ve created a variable called “suicide_per100k_by_country” and through this variable, I filtered countries which stand in the last quartile of the data. I’ve plotted the data through creating line graphs to see how the suicidal rates are changed by countries and years.

By Years

Number of suicides per 100k population by countries

In the animated bar charts, it can be seen that how the number of suicides per 100k population can change over the years for 20 countries. I filtered and ranked the countries based on the number of suicides per 100k population of the countries within 30 years through analyzing countries that exist in the last quartile of the data. But also, some of the countries have missing values for different years, therefore the bars can be disappeared but it eventually will come back since they have the data for further years.

By Age

Number of suicides per 100k population by age

In these line graphs shown below,they are visualized for observing the number of suicidals based on their age and understand how number of suicides change over the generations as well as countries of 12 which have the highest number of suicides per 100k population in total.

By Gender

Number of suicides per 100k population by gender

In these line graphs below,they are visualized for observing the number of suicidals based on their gender and understand how suicidal rates change over the gender as well as countries of 12 which have the highest number of suicides per 100k population in total.

By GDP per capita

Number of suicides per 100k population with GDP per capita

I’ve decided to create an animated bubble chart to understand the relationship between GDP per capita of the top 20 countries (which have the highest total number of suicidals per 100k in 30 years) and the number of suicides through years. Since I believe it would be more observable to qualify these variables’ changes over a timeframe and analyze how alteration of GDP per capita effect the suicidal rates.Also, as mentioned in the previous graphs, even though some of the countries have missing values in different years, they will eventually show up for further years.